dotConnect for SQLite Documentation
Devart.Common Namespace / DbDataReaderBase Class / GetBytes Method / GetBytes(String,Int64,Byte[],Int32,Int32) Method
The name of the column.
The index within the field where the read operation is to begin.
The buffer into which to read the stream of bytes.
The index where buffer is to begin the write operation.
The maximum length to copy into the buffer.

In This Topic
    GetBytes(String,Int64,Byte[],Int32,Int32) Method
    In This Topic
    Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.
    Syntax
    'Declaration
     
    Public Overloads Function GetBytes( _
       ByVal name As String, _
       ByVal fieldOffset As Long, _
       ByVal buffer() As Byte, _
       ByVal bufferOffset As Integer, _
       ByVal length As Integer _
    ) As Long
    public long GetBytes( 
       string name,
       long fieldOffset,
       byte[] buffer,
       int bufferOffset,
       int length
    )

    Parameters

    name
    The name of the column.
    fieldOffset
    The index within the field where the read operation is to begin.
    buffer
    The buffer into which to read the stream of bytes.
    bufferOffset
    The index where buffer is to begin the write operation.
    length
    The maximum length to copy into the buffer.

    Return Value

    The actual number of bytes read.

    Remarks
    GetBytes returns the number of available bytes in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetBytes has already been used to obtain bytes from the field. This may be the case, for example, if the DbDataReaderBase is reading a large data structure into a buffer.

    If you pass a buffer that is a null value, GetBytes returns the length of the field in bytes.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also